/* $Id: ProcessDomainObjectManagerImpl.java 
 * Copyright (C) 2011, TRAKHEES
 *  
 * Revision History
 *
 * Date  			Author 		    	Remarks
 * ---------------------------------------------------------------------------------
 *
 */
package ae.pcfc.etks.online.common.domain.manager.provider;

import java.util.Collection;
import java.util.List;

import ae.pcfc.etks.online.common.dao.ProcessDAO;
import ae.pcfc.etks.online.common.dao.ProcessStepAttachmentDAO;
import ae.pcfc.etks.online.common.dao.ProcessStepDAO;
import ae.pcfc.etks.online.common.domain.ProcStepAthmnt;
import ae.pcfc.etks.online.common.domain.Process;
import ae.pcfc.etks.online.common.domain.ProcessStep;
import ae.pcfc.etks.online.common.domain.manager.ProcessDomainObjectManager;
import ae.pcfc.etks.online.common.exception.LookupException;
import ae.pcfc.etks.online.common.exception.PersistenceException;

public class ProcessDomainObjectManagerImpl implements ProcessDomainObjectManager/*,CustomConverter*/{
	
	private ProcessDAO processDAO;	
	private ProcessStepDAO processStepDAO;
	private ProcessStepAttachmentDAO processStepAttachmentDAO;

	/**
	 * setProcessDAO
	 * 
	 * @param processDAO
	 * void
	 */
	public void setProcessDAO(ProcessDAO processDAO) {
		this.processDAO = processDAO;
	}
	
	/**
	 * getProcessStepDAO
	 * 
	 * @return
	 * ProcessStepDAO
	 */
	public ProcessStepDAO getProcessStepDAO() {
		return processStepDAO;
	}

	/**
	 * setProcessStepDAO
	 * 
	 * @param processStepDAO
	 * void
	 */
	public void setProcessStepDAO(ProcessStepDAO processStepDAO) {
		this.processStepDAO = processStepDAO;
	}

	/**
	 * setProcessStepAttachmentDAO
	 * 
	 * @param processStepAttachmentDAO
	 * void
	 */
	public void setProcessStepAttachmentDAO(ProcessStepAttachmentDAO processStepAttachmentDAO) {
		this.processStepAttachmentDAO = processStepAttachmentDAO;
	}

	/**
	 * add
	 * 
	 * @see ae.pcfc.etks.online.common.domain.manager.BaseDomainObjectManager#add(java.lang.Object)
	 * 
	 */
	public <T> void add(T obj) throws PersistenceException {
		// TODO Auto-generated method stub
		
	}

	/**
	 * update
	 * 
	 * @see ae.pcfc.etks.online.common.domain.manager.BaseDomainObjectManager#update(java.lang.Object)
	 * 
	 */
	public <T> void update(T obj) throws PersistenceException {
		// TODO Auto-generated method stub
		
	}

	/**
	 * delete
	 * 
	 * @see ae.pcfc.etks.online.common.domain.manager.BaseDomainObjectManager#delete(java.lang.Object)
	 * 
	 */
	public <T> void delete(T obj) throws PersistenceException {
		// TODO Auto-generated method stub
		
	}

	/**
	 * findByPrimaryKey
	 * 
	 * @see ae.pcfc.etks.online.common.domain.manager.BaseDomainObjectManager#findByPrimaryKey(java.lang.String)
	 * 
	 */
	public <T> T findByPrimaryKey(String id) throws LookupException {
		// TODO Auto-generated method stub
		return null;
	}

	/**
	 * findAll
	 * 
	 * @see ae.pcfc.etks.online.common.domain.manager.BaseDomainObjectManager#findAll()
	 * 
	 */
	public <T> Collection<T> findAll() throws LookupException {
		// TODO Auto-generated method stub
		return null;
	}

	/**
	 * add
	 * 
	 * @see ae.pcfc.etks.online.common.domain.manager.ProcessDomainObjectManager#add(ae.pcfc.etks.online.common.domain.ProcessStep)
	 * 
	 */
	public boolean add(ProcessStep processStep) throws PersistenceException {
		return processDAO.add(processStep);	
	}

	/**
	 * getProcessByProcessAndStepCode
	 * 
	 * @see ae.pcfc.etks.online.common.domain.manager.ProcessDomainObjectManager#getProcessByProcessAndStepCode(java.lang.String, java.lang.String)
	 * 
	 */
	public ae.pcfc.etks.online.common.domain.Process getProcessByProcessAndStepCode(String processCode, String processStepCode) throws LookupException {
		return this.processDAO.getProcessByProcessAndStepCode(processCode, processStepCode);
	}
	
	/**
	 * getProcessStepByProcessStepCode
	 * 
	 * @see ae.pcfc.etks.online.common.domain.manager.ProcessDomainObjectManager#getProcessStepByProcessStepCode(java.lang.String)
	 * 
	 */
	public ProcessStep getProcessStepByProcessStepCode(String processStepCode){
		return this.processStepDAO.getProcessStepByProcessStepCode(processStepCode);
	}

	/**
	 * findProcessStepAttachmentByPrimaryKey
	 * 
	 * @see ae.pcfc.etks.online.common.domain.manager.ProcessDomainObjectManager#findProcessStepAttachmentByPrimaryKey(java.lang.Long)
	 * 
	 */
	public ProcStepAthmnt findProcessStepAttachmentByPrimaryKey(Long id) throws LookupException {
		
		return this.processStepAttachmentDAO.findByPrimaryKey(id);
	}
	
	/**
	 * getProcessByProcessCode
	 * 
	 * @see ae.pcfc.etks.online.common.domain.manager.ProcessDomainObjectManager#getProcessByProcessCode(java.lang.String)
	 * 
	 */
	public ae.pcfc.etks.online.common.domain.Process getProcessByProcessCode(String processCode) {
		return this.processDAO.getProcessByProcessCode(processCode);
	}

	public List<Process> getAllProcesses() {
		return this.processDAO.getAllProcesses();
	}

	public ProcessStep getProcessStepByProcessCodeAndProcessStepCode(String strProcessCode, String strProcessStepCode) {
		return this.processStepDAO.getProcessStepByProcessCodeAndProcessStepCode(strProcessCode, strProcessStepCode);
	}

}
